From b4e4e56cb1e5cda8ef6ecb0ec010fc1d7cf74850 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Thu, 29 Jun 2006 14:25:35 +0100 Subject: [PATCH] [XM] When two or more domain parameters are given, the xm reboot command doesn't give a command error. This problem is also included in the xm shutdown command. This patch checks on domain parameter. If two or more domain parameters are given, the command error occurs. Signed-off-by: Masaki Kanno --- tools/python/xen/xm/shutdown.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/python/xen/xm/shutdown.py b/tools/python/xen/xm/shutdown.py index fbd3d8f3aa..3a0e2c8c9d 100644 --- a/tools/python/xen/xm/shutdown.py +++ b/tools/python/xen/xm/shutdown.py @@ -92,7 +92,8 @@ def main_all(opts, args): shutdown(opts, None, mode, opts.vals.wait) def main_dom(opts, args): - if len(args) < 1: opts.err('Missing domain') + if len(args) == 0: opts.err('No domain parameter given') + if len(args) > 1: opts.err('No multiple domain parameters allowed') dom = args[0] mode = shutdown_mode(opts) shutdown(opts, [ dom ], mode, opts.vals.wait) -- 2.30.2